package com.xbongbong.workflow.model;


import com.xbongbong.paas.toolbox.wrap.IModel;
import com.xbongbong.workflow.domain.entity.WorkflowEntity;

import java.util.List;
import java.util.Map;


/**
 */
public interface WorkflowModel extends IModel<WorkflowEntity> {

   @Override
   Integer insert(WorkflowEntity entity);

   void insertBatch(List<WorkflowEntity> list);


   @Override
   List<WorkflowEntity> findEntitys(Map<String, Object> param);

   @Override
   Integer getEntitysCount(Map<String, Object> param);

   @Override
   Integer update(WorkflowEntity entity);

   WorkflowEntity getByKey(Long key, String corpid);

   /**
    * 删除
    * @param key
    * @param corpid
    * @return
    */
   Integer deleteByKey(Long key, String corpid);
   /**
    * 批量删除
    * @param key
    * @param corpid
    * @return
    */
   Integer deleteBatch(List<Long> key, String corpid);
   /**
    * 排序
    * @param list
    * @param corpid
    * @return
    */
    Integer updatePriority(List<WorkflowEntity> list, String corpid);

    boolean isSaasWorkFlowEnable(String corpid, Integer businessType);
}
